<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

class UserBackEndController extends BackEndController {
    public function __construct() {
        parent::__construct();
        $this->load->helper('shop');
    }

    public function checkRole() {

    }

    public function renderView($path, $data) {
        if ($this->role == ROLE_SHOP_OWNER && !isset($data['shop'])) {
            $this->load->model('repo/shop_model', 'shop_model');
            $data['shop'] = $this->shop_model->getShopByUserId($this->user_id);
        }
        $this->loadView('backend/layout/layout', $path, $data);
    }
}
?>